using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;


namespace Pokemon
{
    /// <summary>
    /// This is a game component that implements IUpdateable.
    /// </summary>
    public class PushalbeBlank : Blank
    {
        public PushalbeBlank(Game game, Vector2 pos, Vector2 size, Grid owner)
            : base(game, pos, size, owner)
        {
            RemoveEvent();
            Clicked += BlankPanelGridOnClicked;
        }

        #region Initialize

        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public override void Initialize()
        {                        
            base.Initialize();
        }

#endregion

        #region Update

        /// <summary>
        /// Allows the game component to update itself.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        public override void Update(GameTime gameTime)
        {
            // TODO: Add your update code here

            base.Update(gameTime);
        }

#endregion

        #region Support Method

        public void BlankPanelGridOnClicked(object sender, Point p)
        {
            if (Components.Count > 0)
                _owner.SelectedBlank = this;
        }

        public string GetCardName()
        {
            return ((Card) (Components.First())).Name;
        }

#endregion
    }
}
